#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

//template<class T1,T2>
//template<typename T1,T2>
template<class T,size_t N=100>
class s
{
public:
	s()
		:_str("abc")
	{}

	void print()
	{
		cout << _str << N << endl;
	}
private:
	T _str;
};


class father
{
public:
	void func()
	{
		cout << num << endl;
	}
	int num = 111;
};

class child : public father
{
public:
	void func()
	{
		cout << num << endl;
	}
protected:
	int num = 999;
};

void test()
{
	/*s<string> s;
	s.print();*/
	/*child cd;
	cd.func();
	cd.father::func();*/

	child cd;
	//father* f = &cd;
	//father& f = cd;
	//father f = cd;
	//cd.func();
	//f->num = 222;
}

vector<int> twoSum(vector<int>& price, int target) {
	int cur = 0, dest = price.size() - 1;
	vector<int> v;
	int num = price[cur] + price[dest];
	while (num != target)
	{
		if (num > target)
		{
			--dest;
		}
		else if (num < target)
		{
			++cur;
		}
		num = price[cur] + price[dest];
	}
	return { price[cur],price[dest] };
}

struct ListNode {
	int val;
	ListNode* next;
	ListNode() : val(0), next(nullptr) {}
	ListNode(int x) : val(x), next(nullptr) {}
	ListNode(int x, ListNode* next) : val(x), next(next) {}
	
};

ListNode* reverseList(ListNode* head) {
	if (head == nullptr || head->next == nullptr)
		return head;
	ListNode* node = reverseList(head->next);
	ListNode* cur = node;
	head->next->next = head;
	head->next = nullptr;
	return node;
}

int addedInteger(vector<int>& nums1, vector<int>& nums2) {
	/*long sum1 = 0, sum2 = 0;
	for (auto e : nums1)
	{
		sum1 += e;
	}
	for (auto e : nums2)
	{
		sum2 += e;
	}
	long sub = sum2 - sum1;
	if (sub == 0)
		return 0;
	int x = sub / (int)nums1.size();
	return x;*/

	return (*max_element(nums2.begin(), nums2.end())) -
		(*max_element(nums1.begin(), nums1.end()));
}

int main()
{
	test();
}